SUBROUTINE TRANS2
* Display a Reality item, translated using RW_TRANS.* Include the RealWeb definitions.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page.CALL RW_START_HTML_PAGE("TRANS2", "", "", "", "")* Read an item from a Reality file - we'll use a text file called* Adding_images_to_headings.txt. This contains an part of a* document that describes how to write HTML. It is important that* the HTML example should be displayed literally.
ITEM = ""
OPEN "REALWEB-ITEMS" TO F ELSE STOP
READ ITEM FROM F,"Adding_images_to_headings.txt" ELSE STOP
CLOSE F
* Convert reserved HTML characters into escape sequences.* This will let us display the text correctly, without the* HTML in the example being used to format the text.CALL RW_TRANS(ITEM, RWD_NORMAL)* Complete the page.CALL RW_END_PAGE
RETURN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META NAME="Generator" CONTENT="Reality"><TITLE>TRANS2</TITLE></HEAD><BODY>
Adding an image to a heading is easy. For example, the following HTML puts
an "information" icon inside the "For More Information"
heading.<BR><BR>
<h2><BR>
<img src="info.gif"><BR>
For More Information<BR>
</h2><BR></BODY></HTML>